const mongoose = require('mongoose')

// 系统用户模型对象
// const userSchema =  new mongoose.Schema({
//   username: String,
//   pwd: String
// })
// const User = mongoose.model('jianshu_users', userSchema)

// 用户对象
const userSchema =  new mongoose.Schema({
  username: String,
  pwd: {
    type: String,
    select: false
  },
  avatar: {
    type:String,
    default: ''
  },
  sex: {
    type:String,
    default: ''
  },
  desc: {
    type:String,
    default: ''
  },
  phone: {
    type:String,
    default: ''
  },
  email: {
    type:String,
    default: ''
  }
})
const Users = mongoose.model('jianshu_users', userSchema)


module.exports = {
  // User
  Users
}